package edu.hawaii.senin.iclouds.basics;

/**
 * The accumulator interface is extremely helpfull in accounting.
 * 
 * @author Pavel Senin.
 * @param <T> the accumulator type.
 */
public interface Accumulator<T> {

  /**
   * Sets the name of the current accumulator.
   * 
   * @param name the accumulator name to set.
   */
  public void setName(String name);

  /**
   * Reports the accumulator name.
   * 
   * @return the accumulator name.
   */
  public String getName();

  /**
   * Sets the accumulator value.
   * 
   * @param value the value to set.
   */
  public void setValue(T value);

  /**
   * Reports the accumulator value.
   * 
   * @return the accumulator value.
   */
  public T getValue();

  /**
   * increments accumulator value by value provided.
   * 
   * @param incValue value that will be added.
   */
  public void increment(T incValue);

}
